#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    QMenuBar *menuBar = this->menuBar();
    this->setMenuBar(menuBar);

    QMenu *menu1 = new QMenu("曹飞");
    QMenu *menu2 = new QMenu("cf");
    QMenu *menu3 = new QMenu("child");
    menuBar->addMenu(menu1);
    menu1->addMenu(menu2);
    menu1->addMenu(menu3);
    menu1->addSeparator();

    QAction *action1 = new QAction("ccb");
    menu2->addAction(action1);

    QAction *action2 = new QAction("ccb222");
    menu1->addAction(action2);



    action2->setIcon(QIcon(":/image/1.jpg"));
    menu2->setIcon(QIcon(":/image/1.jpg"));
    menu3->setIcon(QIcon(":/image/1.jpg"));
}

MainWindow::~MainWindow()
{
    delete ui;
}

